fatal("Bad date '%s'.\n", c);
}
wpt->creation_time += mkgmtime(&tm2);
- wpt->creation_time = wpt->creation_time.addMSecs(millisecs);
break;
case 10: // Unknown. Ignored.
case 11: // Bearing. Ignored.
DateTime(QDateTime dt) : QDateTime(dt) {}
// TODO: this should go away in favor of .addSecs().
- time_t operator+=(const time_t& t) {
- setTime_t(toTime_t() + t);
- return toTime_t();
+ // add time_t without losing any existing milliseconds.
+ DateTime& operator+=(const time_t& t) {
+ QDateTime dt = addSecs(t);
+ setDate(dt.date());
+ setTime(dt.time());
+ return *this;
}
// Integer form: YYMMDD